﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Obvious.Framework.Extensions
{
    public static class DBExtensions
    {
        /// <summary>
        /// Verifies Data Object with Null value.
        /// Data Object - E.g. DataRow, DataColumn
        /// </summary>
        /// <param name="obj">Data Object</param>
        /// <returns>Boolean indication of Object if Null</returns>
        public static bool IsDBNull(this object obj)
        {
            return obj == DBNull.Value;
        }
        /// <summary>
        /// Verifies Data Object with Not Null value.
        /// Data Object - E.g. DataRow, DataColumn
        /// </summary>
        /// <param name="obj">Data Object</param>
        /// <returns>Boolean indication of Object if Not Null</returns>
        public static bool IsNotDBNull(this object obj)
        {
            return obj != DBNull.Value;
        }
        public static int Add(this int FirstInt, int SecondInt)
        {
            return FirstInt + SecondInt;
        }
    }
    public static class EntityExtensions
    {
        public static bool IsNull(this object obj)
        {
            return obj == null;
        }
    }
}
